<template>
	<div id="app">
		<div id="user_reserve">
			<div class="name">
				<div class="con">
					<p>{{active.name}}三日游</p>
					<span>请确定购买，订单提交后不能取消哦</span>
				</div>
				<div class="space">
					<p><span>￥{{active.cost}}</span>/位</p>
				</div>
				<div class="clear"></div>
			</div>
			<div class="number">
				<input placeholder="参加人数" style="width: 100%;height: 100%;"/>
			</div>
			<div id="buy_nav">
				<div class="money">
					<p>总价<span>￥{{active.cost}}</span></p>
				</div>
				<input class="cur" type="button" @click="itemClicked(active)" value="提交订单"></input>
			</div>

		</div>
	</div>
</template>

<script>
	import config from '@/config'
	export default {
		data() {
			return {
				usr:'',
				active:{},
				vid:''
			}
		},
		onLoad(option){
			if(option.id){
				this.vid = option.id;
			}
			
				var that = this;
				uni.request({
					url: `${config.baseUrl}/active/one?token=` + uni.getStorageSync('token') + '&id=' + that.vid,
					method: 'GET',
					success(r) {
						if (r.data.succ) {
								that.active = r.data.data;
						} else {
						
						}
					},
					complete(res){
						if(res.data && res.data.msg){
							uni.showToast({
								icon:'none',
								title:res.data.msg
							})
						}
					},
				});
		},
		methods: {
				itemClicked:function(item){
					uni.navigateTo({
						url:`sure_order?id=${item.id}&id2=${1}`
					})
				},
				itemClicked1:function(item){
					uni.navigateTo({
						url:`activity_detail?id=${item.id}`
					})
				}
			}
	}
</script>

<style>
</style>
